from django.test import TestCase
from django.test.client import Client

"""
Testira sve about strane
"""
class AboutTestCase(TestCase):
    
    def setUp(self):
        pass

    def runTest(self):
        self.testAbout()
        self.testRecommendedAbout()
        self.testScoringAbout()

    def testAbout(self):
        c = Client()
        c.login(username='kokan', password='123')
        
        response = c.get("/mdcs/about/")
        self.failIf(response == None)
        self.failIf(response.context == None)
        self.failUnlessEqual(len(response.context), 2)
        self.assertEqual(response.status_code, 200)

    def testRecommendedAbout(self):
        c = Client()
        c.login(username='kokan', password='123')
        
        response = c.get("/mdcs/about/recommended/")
        self.failIf(response == None)
        self.failIf(response.context == None)
        self.failUnlessEqual(len(response.context), 2)
        self.assertEqual(response.status_code, 200)

    def testScoringAbout(self):
        c = Client()
        c.login(username='kokan', password='123')
        
        response = c.get("/mdcs/about/scoring/")
        self.failIf(response == None)
        self.failIf(response.context == None)
        self.failUnlessEqual(len(response.context), 2)
        self.assertEqual(response.status_code, 200)